-
Notifications
You must be signed in to change notification settings - Fork 58
Adds some snippets in devsite that were missing and fixes a snippet start tag. #394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
// Initialize the generative model with a model that supports your use case | ||
// Gemini 1.5 Pro is versatile and can accept both text-only or multimodal prompt inputs | ||
let model = vertex.generativeModel(modelName: "{{generic_model_name_initialization}}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible for includecode and the snippet registry to work with DevSite variables like this?
{{generic_model_name_initialization}}
If so, could we pls change the explicit insertion of a model name in the other snippets to use this variable, too? :-D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. It depends on which templating thing runs first in devsite. I put this here without checking, but I can try it out in staging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted this snippet and updated all others to use the template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried moving these into the docs today and it doesn't work. Can't remember what I did to test that made them work.
let vertex = VertexAI.vertexAI() | ||
|
||
// Initialize the generative model with a model that supports your use case | ||
// Gemini 1.5 Pro is versatile and can accept both text-only or multimodal prompt inputs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Gemini 1.5 models are versatile and can be used with all API capabilities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -39,6 +39,63 @@ class Snippets { | |||
self.model = model | |||
} | |||
|
|||
func templateInitializeModel() { | |||
// [START template_initialize_model] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the snippet registry... would we use this initialization snippet or the one added with #392?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved with the deletion of the other snippet and conversion of all snippets to template model name.
No description provided.